from sqlalchemy import Column, Integer, String

from database.db_sql import Base


class Group(Base):
    __tablename__ = 'web_tab_url_group'
    id = Column(Integer, primary_key=True, index=True)
    name = Column(String(100), nullable=False)
    sort_order = Column(Integer, nullable=True)


class WebURL(Base):
    __tablename__ = 'web_tab_url'
    id = Column(Integer, primary_key=True)
    url = Column(String(200), nullable=False)
    name = Column(String(100), nullable=False)
    icon = Column(String(100), nullable=True)
    description = Column(String(100), nullable=True)
    sort_order = Column(Integer, nullable=True)
    group_id = Column(Integer, nullable=True)


class Setting(Base):
    __tablename__ = 'web_tab_setting'
    id = Column(Integer, primary_key=True)
    key = Column(String(100), unique=True, nullable=False)
    value = Column(String(200), nullable=False)
    description = Column(String(200), nullable=True)
    input_type = Column(String(100), nullable=True)
